using System;
using System.Collections;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Xml;
using System.Data.OleDb;
using System.Runtime.InteropServices;
using DevComponents.DotNetBar;
using Shine.Framework;


namespace Shine.Tool
{
   
    public partial class FrmSelectField : Office2007Form
    {
        IApplication m_Application = null;
      
     
    public string SelectField
        {
            get;set;
        }
        public SuperMap.Data.Recordset Recordset
        {
            get;set;
        }
        
          public FrmSelectField()
        {
            InitializeComponent();
        }
   
    
       
        public IApplication Application
        {
            set
            {
                m_Application = value;
            }
        }

    
        private void FrmQuery_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < Recordset.FieldCount; i++)
            {
                if (Recordset.GetFieldInfos()[i].IsSystemField == false & Recordset.GetFieldInfos()[i].Name != "SmUserID")
                {
                    listBox1.Items.Add(Recordset.GetFieldInfos()[i].Name);
                }
            }

        }
     

   
        private void FrmQuery_KeyDown(object sender, KeyEventArgs e)
        {

        }

  

        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            SelectField = listBox1.SelectedItem.ToString();
            this.DialogResult = DialogResult.OK;
        }
    }
}